package com.lenovo.dh.voteclient;

import com.lenovo.dh.voteclient.utils.Utils;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends ActionBarActivity {
	
	public static String name;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		if (savedInstanceState == null) {
			if(TextUtils.isEmpty(Utils.getNameByShare(this))) {
				getSupportFragmentManager().beginTransaction().add(R.id.container, new LoginFragment()).commit();
			} else {
				getSupportFragmentManager().beginTransaction().add(R.id.container, new PlaceholderFragmentEx()).commit();
			}
		}
	}
	@Override
	protected void onStop() {
		this.finish();
		super.onStop();
	}

	

}
